package com.neuedu.service.impl;

import com.neuedu.bean.User;
import com.neuedu.mapper.UserMapper;
import com.neuedu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(String userId) throws Exception {
        return userMapper.getUserById(userId);
    }

    @Override
    public int saveUser(User user) throws Exception {

        return userMapper.saveUser(user);
    }

    /*
     *  登录
     * */
    @Override
    public User getUserByIdByPass(String userId, String password) throws Exception {
        return userMapper.getUserByIdByPass(userId, password);
    }
}
